<include file="Public/HOME/HTML/head_html_5.html" />
<title>修改密码{$Think.const.TITLE}</title>
<include file="Public/HOME/HTML/CssAndJs.html" />
<include file="Public/HOME/HTML/middle_list.html" />
<script type="text/javascript" src="http://code.hs-cn.com/jquery/jquery-1.7.1.min.js">
</script>
<meta charset="utf-8" />
<script language="javascript">
    function checkLen(){
		var password_1 = document.getElementById("password_1").value.length;
		var password_2 = document.getElementById("password_2").value.length;
		var password_11 = document.getElementById("password_1").value;
		var password_22 = document.getElementById("password_2").value;
		var password = document.getElementById("password").value;
		if(!password){
			alert("原密码不能为空哦");
			return false;
		}
		if(password_1<6||password_2<6){
			alert("密码长度小于6了哦");
			return false;
		}
		if(password_11!=password_22){
			alert("两次输入的密码不一样哦！");
			return false;
		}
        return true;
    }
</script>
<script>
	$(function(){  
		$('#password').bind('input propertychange', function() {                       // 不明白这句是什么意思
		    var gradename = $(this).val();                                             // 获取该文本框的值
			address = "{$Think.const.DOMAIN_NAME}Home/Account/checkPwd/id/"+gradename; // 设置$.get调用路径
			$.get(address,function(str){                                               // 方法不太明白，大概意思是获取$.get返回的值
			if(str==0){                                                                // 如果返回的时0的话就证明是对的
				$('#result').html(" ");
			}else{                                                                     // 其他情况都是原密码错误
				$('#result').html("原密码错误");
			}
		    });	
		});
		
		
		  
})  
</script>
<div class="container-fluid main-content" style="heigth:700px">
    <div class="row">
        <div class="col-lg-12">
            <div class="widget-container fluid-height clearfix">
                <div class="heading">
                    <i class="icon-reorder"></i>修改密码
                </div>
                <div class="widget-content padded">
                    <form method="post" action="__SELF__" class="form-horizontal" onsubmit="return checkLen()" enctype="multipart/form-data">
                        <div class="form-group" style="margin:32px 0 25px 100px">
                            <label class="control-label col-md-2">
                                原密码 
                            </label>
                            <sup class="surely" id="result">
                                *
                            </sup>
                            <div class="col-md-7">
                                <input class="form-control" id="password" placeholder="" type="password" name="password" required>
                            </div>
                        </div>
                        <div class="form-group" style="margin:0 0 25px 100px">
                            <label class="control-label col-md-2">
                                新密码 
                            </label>
                            <sup class="surely">
                                *
                            </sup>
                            <div class="col-md-7">
                                <input class="form-control" id="password_1" placeholder="" maxlenght="16" type="password" name="password_new" required>
                            </div>
                        </div>
                        <div class="form-group" style="margin:0 0 25px 100px">
                            <label class="control-label col-md-2">
                                确认密码 
                            </label>
                            <sup class="surely">
                                *
                            </sup>
                            <div class="col-md-7">
                                <input class="form-control" id="password_2" placeholder="" maxlenght="16" type="password" name="password_new_ok" required>
                            </div>
                        </div>
                        <div class="form-group" style="margin:0 0 42px 100px">
                            <label class="control-label col-md-2">
                            </label>
                            <div class="col-md-7">
                                <button class="btn btn-primary" type="submit" style="width:100%">
                                    确认修改
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <include file="Public/HOME/HTML/footer.html" />
    </body>
</html>